Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(auth): fix an issue where an asp.net application could potentially freeze when targetting a SharePoint On-premise environment #1030

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

nathan-swannet
Copy link
Contributor

@nathan-swannet nathan-swannet commented Jun 14, 2024

In the ConfigureOnPremisesContext an event handler is registered containing an async function which is invoked with .GetAwaiter().GetResult();
This can and will freeze your whole asp.net application due to the nature of how the continuation of that task is done in this context.

Wrapping it in a Task.Run fixes this issue and ensures any exception are still thrown in the current synchronisation context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant